<?php if(!empty($comments)):?>
    <?php foreach($comments as $row):?>
        <div class="container" style="border-bottom: 5px solid rgb(242, 242, 242);">
            <div>
                <div style="float:left;margin-right: 20px;"><img <?php if($row['headimgurl'] != ''):?>src="<?php echo $row['headimgurl'];?>" <?php else:?>src="__IMG__/no.jpg" <?php endif;?>  style="border-radius: 50px;height:40px;width: 40px;"></div>
                <div style="float:left;">
                    <div><?php echo $row['nickname'];?></div>
                    <div><?php echo date('Y-m-d H:i:s',$row['add_time']);?></div>
                </div>
                <div style="float:right;">
                    <?php if($row['self_click_flag']==1):?>
                    <!--用户对该条评论已经点赞过-->
                        <span class="glyphicon glyphicon-thumbs-up" style="font-size: 25px;color: red;" flag="1" data-comment-id="<?php echo $row['comment_id'];?>" data-message-id="<?php echo $row['message_id'];?>" data-uid-id="<?php echo $row['user_id'];?>" onclick="comment_like(this)"></span>
                    <?php else:?>
                    <span class="glyphicon glyphicon-thumbs-up" style="font-size: 25px;" flag="0" data-comment-id="<?php echo $row['comment_id'];?>" data-message-id="<?php echo $row['message_id'];?>" data-uid-id="<?php echo $row['user_id'];?>" onclick="comment_like(this)"></span>
                    <?php endif;?>

                    <span style="font-size: 14px;"><?php echo $row['like_comment_num'];?></span>
                </div>
                <div style="clear:both;"></div>
            </div>
            <div style="font-size: 17px;"><?php echo $row['content'];?></div>
        </div>
    <?php endforeach;?>
<?php endif;?>
